#!/usr/bin/make -f

# For some crappy reason Ubuntu includes this flag by default when building deb
# packages. This breaks signal/slot connections across *.sos in
# Corrade::Interconnect library (which may affect some examples here) and as
# said on the links below, it has some noticeable unintended/dangerous effects
# as well, so I'm just disabling it globally. See:
#  http://stackoverflow.com/questions/7216973/is-there-a-downside-to-using-bsymbolic-functions
#  https://software.intel.com/en-us/articles/performance-tools-for-software-developers-bsymbolic-can-cause-dangerous-side-effects
export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions

%:
	dh $@ --parallel

override_dh_auto_configure:
	dh_auto_configure -- \
		-DCMAKE_BUILD_TYPE=Release \
		-DWITH_ANIMATED_GIF_EXAMPLE=ON \
		-DWITH_ARCBALL_EXAMPLE=ON \
		-DWITH_AREALIGHTS_EXAMPLE=ON \
		-DWITH_AUDIO_EXAMPLE=ON \
		-DWITH_BOX2D_EXAMPLE=ON \
		-DWITH_BULLET_EXAMPLE=ON \
		-DWITH_DART_EXAMPLE=OFF \
		-DWITH_CUBEMAP_EXAMPLE=ON \
		-DWITH_FLUIDSIMULATION2D_EXAMPLE=OFF \
		-DWITH_FLUIDSIMULATION3D_EXAMPLE=OFF \
		-DWITH_IMGUI_EXAMPLE=OFF \
		-DWITH_MOTIONBLUR_EXAMPLE=ON \
		-DWITH_MOUSEINTERACTION_EXAMPLE=ON \
		-DWITH_OCTREE_EXAMPLE=ON \
		-DWITH_PICKING_EXAMPLE=ON \
		-DWITH_PRIMITIVES_EXAMPLE=ON \
		-DWITH_RAYTRACING_EXAMPLE=ON \
		-DWITH_SHADOWS_EXAMPLE=ON \
		-DWITH_TEXT_EXAMPLE=ON \
		-DWITH_TEXTUREDTRIANGLE_EXAMPLE=ON \
		-DWITH_TRIANGLE_EXAMPLE=ON \
		-DWITH_TRIANGLE_PLAIN_GLFW_EXAMPLE=OFF \
		-DWITH_TRIANGLE_SOKOL_EXAMPLE=OFF \
		-DWITH_VIEWER_EXAMPLE=ON
